﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mapping.Attributes;

namespace TinyERP.Core.Entity
{
    [NHibernate.Mapping.Attributes.Class(Table = "GroupACL", NameType = typeof(GroupACL), Lazy = false)]
    public class GroupACL
    {
        [NHibernate.Mapping.Attributes.Id(0, TypeType = typeof(long), Column = "ID", Name = "ID")]
        [NHibernate.Mapping.Attributes.Generator(1, Class = "native")]
        public virtual long ID { get; set; }

        [NHibernate.Mapping.Attributes.ManyToOne(Column = "GroupID", Fetch = FetchMode.Join, ClassType = typeof(Group))]
        public virtual Group Group { get; set; }

        [NHibernate.Mapping.Attributes.ManyToOne(Column = "UINodeID", Fetch = FetchMode.Join, ClassType = typeof(UINode))]
        public virtual UINode UINode { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "AllowDelete")]
        public virtual bool AllowDelete { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "AllowView")]
        public virtual bool AllowView { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "AllowEdit")]
        public virtual bool AllowEdit { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "AllowCreate")]
        public virtual bool AllowCreate { get; set; }
    }
}
